<?php

namespace app\validate\admin;

use think\Validate;

/**
 * 登录验证
 * Class LoginValidate
 * @package app\validate\admin
 */
class LoginValidate extends Validate
{
    /**
     * 验证规则
     * @var array|string[]
     */
    protected $rule = [
        'username' => 'require|length:4,20',
        'password' => 'require|length:6,15',
    ];

    /**
     * 提示信息
     * @var array|string[]
     */
    protected $message = [
        'username.require' => '账号不能为空',
        'username.length' => '名称长度在4-20字符之间',
        'password.require' => '密码不能为空',
        'password.length' => '密码长度在6-15字符之间',
    ];

}